{extend name="property/public/insidePageBase" /}
{block name="title"}修改同住人员信息{/block}
{block name="body"}
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="layui-form layui-form-pane">
            <div class="layui-row">
                <div class="layui-col-xs5">
                    <div class="layui-form-item">
                        <label class="layui-form-label indispensable">住户姓名</label>
                        <div class="layui-input-block">
                            <input type="text" name="username" value="{$info['username']??''}" autocomplete="off" placeholder="请输入住户姓名" class="layui-input">
                        </div>
                    </div>
                </div>
                <div class="layui-col-xs7">
                    <div class="layui-form-item">
                        <label class="layui-form-label indispensable">联系方式</label>
                        <div class="layui-input-block">
                            <input type="text" name="mobile" value="{$info['mobile']??''}" autocomplete="off" placeholder="请输入联系方式" class="layui-input">
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-row">
                <div class="layui-col-xs5">
                    <div class="layui-form-item">
                        <label class="layui-form-label indispensable">证件类型</label>
                        <div class="layui-input-block">
                            <select name="is_type"  lay-search>
                                <option value="">--请选择--</option>
                                <option value="1" {:isset($info['is_type']) ? $info['is_type'] == 1 ? 'selected' : '' : ''}>身份证</option>
                                <option value="2" {:isset($info['is_type']) ? $info['is_type'] == 2 ? 'selected' : '' : ''}>护照</option>
                                <option value="3" {:isset($info['is_type']) ? $info['is_type'] == 3 ? 'selected' : '' : ''}>港澳通行证</option>
                                <option value="4" {:isset($info['is_type']) ? $info['is_type'] == 4 ? 'selected' : '' : ''}>回乡证</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="layui-col-xs7">
                    <div class="layui-form-item">
                        <label class="layui-form-label indispensable">证件号码</label>
                        <div class="layui-input-block">
                            <input type="text" name="number" value="{$info['number']??''}" autocomplete="off" placeholder="请输入证件号码" class="layui-input">
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label required">证件正面照</label>
                <div class="layui-input-inline">
                    <input type="text" name="front_file" value="{$info['front_file']}" placeholder="请上传证件正面照" id="front_file" class="layui-input">
                </div>
                <img src="{$info['front_file']}" class="checkPictureByImg front_file" style="width: 80px;height: 40px;">
                <div class="layui-input-inline layui-btn-container" style="width: auto;">
                    <button type="button" class="layui-btn layui-btn-primary uploadImg" lay-data="{field: 'front_file',data:{dir:'contract/lessee', field:'front_file'}}">
                        <i class="layui-icon">&#xe67c;</i>
                    </button>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label required">证件反面照</label>
                <div class="layui-input-inline">
                    <input type="text" name="back_file" value="{$info['back_file']}" placeholder="请上传证件反面照" id="back_file" class="layui-input">
                </div>
                <img src="{$info['back_file']}" class="checkPictureByImg back_file" style="width: 80px;height: 40px;">
                <div class="layui-input-inline layui-btn-container" style="width: auto;">
                    <button type="button" class="layui-btn layui-btn-primary uploadImg" lay-data="{field: 'back_file',data:{dir:'contract/lessee', field:'back_file'}}">
                        <i class="layui-icon">&#xe67c;</i>
                    </button>
                </div>
            </div>
            <div class="layui-form-item layui-form-text">
                <label class="layui-form-label">备注说明</label>
                <div class="layui-input-block">
                    <textarea placeholder="请输入费用说明" class="layui-textarea" name="remark">{$info['remark']}</textarea>
                </div>
            </div>
            <div class="layui-form-item layui-hide">
                <button type="button" class="layui-btn layui-btn-primary replaceUploadImg toggleUpload" lay-data="{}"></button>
                <button class="layui-btn" lay-submit lay-filter="submitBtn" id="submitBtn">提交</button>
            </div>
        </div>
    </div>
</div>
{/block}
{block name="js"}
{__block__}
<script>
    layui.use(['form', 'layer','laytpl'], function () {
        var form = layui.form,layer = layui.layer,  $ = layui.$,laytpl = layui.laytpl;
        $('.uploadImg').selectImages({
            confirm:function(res,elem,data) {
                $('#' + data.field).val(res[0].src);
                $('.' + data.field).attr('src',res[0].src)
            }
        });
    });
</script>
{/block}